<template>
	<view class="my-banner">
		<swiper circular="true" autoplay="true" indicator-dots="true" indicator-active-color="#ff5e48"
			indicator-color="#cccccc" class="swiper">
			<block v-for="item in arrBanner" :key="item.id">
				<swiper-item>
					<image class="img" mode="widthFix" :src="item.imgSrc" />
				</swiper-item>
			</block>
		</swiper>
	</view>
</template>

<script>
	export default {
		name: "MyBanner",
		data() {
			return {
				arrBanner: [
					{
						id: 1,
						imgSrc: '/static/banner1.jpg'
					},
					{
						id: 2,
						imgSrc: '/static/banner2.jpg'
					},
					{
						id: 3,
						imgSrc: '/static/banner3.jpg'
					},
				]
			};
		},
		methods: {

		}
	}
</script>

<style lang="scss">
	.my-banner {
		width: 100%;
		margin-top: 30rpx;

		.swiper {
			height: 294rpx;
		}

		.img {
			width: 100%;
			border-radius: 20rpx;
		}
	}
</style>
